﻿#ifndef _ZMQSUBSCRIBER_H
#define _ZMQSUBSCRIBER_H

#include <stdio.h>
#include <string>
#include <thread>
#include "zmq.h"

typedef void * (*ReplayCallBack)(void * buf,long len,void * context);

class ZmqSubscriber
{
public:
    ZmqSubscriber();
    virtual ~ZmqSubscriber();

public:
    int Connect(const char * address);
	int Connect(const char* szSvrIp, int port);
	int resv(char *data, int length);
private:
    void * m_context;
    void * m_socket;
	const char*  szSvrIp ;
	int port;
	const char *address;
	int m_timeout = 1000;
};

#endif /* _ZMQSUBSCRIBER_H */
